<template>
    <div class="echarts" ref="map">
        <div id="radar"></div>
    </div>
</template>
<script>
import * as Echarts from 'echarts'
import {fontSize } from '@/utils/tools'
export default {
    data () {
      return {
        echartsData: [
            {value:[40, 30, 50, 25, 45, 60, 35.6, 32.2, 62.6, 20.0, 80, 60,50, 100,40]}
        ]          
      }
    },
    mounted(){
        this.getEcharts()
    },
    methods: {
        getEcharts(){
            let myChart = Echarts.init(document.getElementById("radar"))
            myChart.setOption({
            tooltip: {
                trigger: 'axis'
            },
            radar: [
                {
                    indicator: [
                        {text: '社会科学', max: 100},
                        {text: '政治法律', max: 100},
                        {text: '军事科学', max: 100},
                        {text: '财经管理', max: 100},
                        {text: '历史地理', max: 100},
                        {text: '九年义务', max: 100},
                        {text: '语言文字', max: 100},
                        {text: '中国文学', max: 100},
                        {text: '外国文学', max: 100},
                        {text: '音乐', max: 100},
                        {text: '美术雕刻', max: 100},
                        {text: '摄影影视', max: 100},
                        {text: '舞蹈戏曲', max: 100},
                        {text: '书法篆刻', max: 100},
                        {text: '自然科学', max: 100},
                    ],
                    radius: fontSize(80),
                    center: ["50%", "50%"]
                }
                    
            ],
            series: [
                {
                    type: 'radar',
                    areaStyle: {},
                    data: this.echartsData
                }
            ],
            })
        }
    }
}
</script>
<style lang="less" scoped>
    .echarts{
        width: 343px;
        height: 300px;
        background-color: #fff;
        content: '';
        display: table;
        clear: both;
        #radar {
            width: 572px;
            height: 358px;
        }
          .top-titile{
            font-size: 16px;
            color: #222E44;
            margin-left: 12px;
            margin-top: 12px;
            font-weight: bold;
        }
    }
</style>